<?php

namespace app\api\controller;

use app\api\service\OtherService;
use think\response\Json;

class Other extends ApiController
{
    /**
     * 获取客服配置
     * @return Json
     */
    public function getServiceConfig()
    {
        $params = $this->getData([['type', 1]]);
        return $this->data(OtherService::getServiceConfig(intval($params['type'])));
    }

    /**
     * 获取协议内容
     * @return Json
     */
    public function getAgreementConfig()
    {
        $params = $this->getData(['type']);
        return $this->data(OtherService::getAgreementConfig(intval($params['type'])));
    }

    /**
     * 获取关于我们
     * @return Json
     */
    public function getAboutConfig()
    {
        return $this->data(OtherService::getAboutConfig());
    }
}